<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> 
<%@ include file="/decorators/taglib.jsp"%>
<script>
      var jsonMyPagination;
	  var myparams;
      $(function() 
	   {
			$("#expaccordion").accordion(
			{
				header: "h3"
			});
			init();
			initEvent();
			$('.button').button();
	    })
	   function init() 
	   {
         $(":text:first").focus();
       }
       function initEvent() 
	   {
			jsonMyPagination = $("#expdatagrid").myPagination(
			{
				cssStyle: "exp",
				panel: 
					{
						tipInfo_on: true,
						tipInfo: '&nbsp;&nbsp;跳{input}/{sumPage}页',
						tipInfo_css: 
							{
							  width: '25px',
							  height: "20px",
							  border: "2px solid #f0f0f0",
							  padding: "0 0 0 5px",
							  margin: "0 5px 0 5px",
							  color: "#666"
							}
				    },
				debug: false,
				 ajax: 
					{
						on: true,
						url: '<c:url value="/knowledge/getGridSql.action"/>',
						dataType: 'json',
						param: myparams,
						ajaxStart: function() 
							{
								ZENG.msgbox.show(" 正在加载中，请稍后...", 6, 10000);
							},
						ajaxStop: function() 
							{
							  //隐藏加载提示
							  setTimeout(function() 
								{
									ZENG.msgbox.hide();
								}, 120000);
							},
						callback: function(data) 
							{
								  
								 $("#mytab tbody").setTemplateElement("Template-List").processTemplate(data);
								 $('#mytab tbody').addClass('TrHover');
								 $("#mytab tbody tr").addClass("odd");
								 $("#mytab tbody tr:even").addClass("even");
								 $('#mytab tbody tr').click(function()
								  {
									  $(".Expselected").removeClass("Expselected"); 
									  $(this).toggleClass("Expselected"); 
								  });
								  ZENG.msgbox.hide();
							}
				  }
			});
	
      }
	 function info(str)
	 {
	  alert(str);
	 }
	 	
    function query() 
			{
			  var params = $("#queryForm").serialize();
			  params = decodeURI(params);
			  myparams = params;
			  initEvent();
			}
		function add() 
	{
	 alert("add");
	}
		function del() 
	{
	 alert("delete");
	}
    </script>
</head>
<body>
	<form id="queryForm" name="queryForm" action="">
  <table width="100%" id="tab">
    <thead >
      <tr>
        <th colspan="6" style="font-size:14px; text-shadow:700;   text-align: left;">查询条件</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td class="one">序列名称:</td>
        <td colspan="2" class="two"><input type="text" id="seqname" name="seqname"  class="three" value="" /></td>
        <td colspan="3">
			<input type="button" class="button" value="查询" onclick="query();"/>&nbsp;
			<input type="button" class="button" value="增加" onclick="add();"/>&nbsp;
			<input type="button" class="button" value="删除" onclick="del();"/>
			<input type="reset" class="button" value="重置" />
		</td>
      </tr>
      <tr class="tr_edd">
        <td class="one">当前值</td>
        <td class="two" colspan="2"><input type="text" id="currentvalue" name="currentvalue"  class="three" value="" /></td>
        <td class="one">每次增加值</td>
        <td class="two" colspan="2"><input type="text" id="increment" name="increment"  class="three" value="" /></td>
      </tr>
      
    </tbody>
  </table>
</form>
	<table width="100%" id="mytab" class="t1">
		<thead>
			<th>序列名称</th>
			<th>当前值</th>
			<th>每次增加值</th>
			<th>操作</th>
		</thead>
		<tbody>
		</tbody>
	</table>
	<div id="expdatagrid"></div>
	<!-- Templates -->
	<p style="display:none">
		<textarea id="Template-List" rows="0" cols="0">
		  <!--
			{#template MAIN}
				{#foreach $T.result as Result}
				  <tr>
					<td>{$T.Result.seqname}</td>
					<td>{$T.Result.currentvalue}</td>
					<td>{$T.Result.increment}</td>
					<td><a href="#" onclick="info({$T.Result.increment})">详情</a></td>
				   </tr>
				{#/for}
			{#/template MAIN}
		  -->
		</textarea>
	</p>
</body>
</html>


